<template>
  <div class="about">
    <h1>This is an about page 共享：{{$store.state.count}}</h1>
	<button @click="add">共享+</button>
  </div>
</template>

<script>
	import {mapMutations} from 'vuex'
	export default {
		methods:{
			// increments(){
			// 	this.$store.commit('increment')
			// }
			//与store中index的mutations同名可以这么写
			// ...mapMutations(['increment'])
			...mapMutations({
				add:'increment'
			})
		}
	}
</script>